<div id="mws-container" class="clearfix">
    <div class="container">
        <div class="mws-panel grid_8">
            <div class="mws-panel-header"> <span class="mws-i-24 i-table-1">Brands - Management</span> 
                <span class="linktop">
                    <?php echo $html->link('Add Brand', array('controller' => 'Setups', 'action' => 'add_brand')) ?>
                </span>
            </div>
            <div class="mws-panel-body">
                <div class="dataTables_wrapper">
                    <table class="mws-datatable-fn mws-table">
                        <thead>
                            <tr>
                                <th class="sorting_asc" rowspan="1" colspan="1" style="width: 141px;">Name</th>
                                <th class="sorting" rowspan="1" colspan="1" style="width: 150px;">Keywords</th>
                                <th class="sorting" rowspan="1" colspan="1" style="width: 239px;">image</th>
                                <th class="sorting" rowspan="1" colspan="1" style="width: 239px;">Order</th>
                                <th class="sorting" rowspan="1" colspan="1" style="width: 150px;">Status</th>
                                <th class="sorting" rowspan="1" colspan="1" style="width: 91px;">Actions</th>
                            </tr>
                        </thead>
                        <?php
                        if (isset($brands) and ($brands)):
                            //pr($brands);
                            //exit;
                            ?>
                            <tbody>
                                <?php
                                $x = 0;
                                foreach ($brands as $brand) {
                                    if ($x % 2 == 0) {
                                        $class = "odd";
                                    } else {
                                        $class = "even";
                                    }
                                    ?>
                                    <tr class="gradeA <?php echo $class; ?>">
                                        <td class=" sorting_1"><?php echo $brand['Brand']['name']; ?></td>
                                        <td class=" sorting_1"><?php echo $brand['Brand']['keyword']; ?></td>
                                        <td class=" sorting_1"><img height="50" width="50" src="<?php echo $website_url; ?>img/Brand/<?php echo $brand['Brand']['img']; ?>" /></td>
                                        <td class=" sorting_1"><?php echo $brand['Brand']['sort']; ?></td>
                                        <td class="center">
                                            <?php
                                            if (isset($brand['Brand']['status']) and ($brand['Brand']['status'] == 1)) {
                                                echo "Active";
                                            } else {
                                                echo "Deactive";
                                            }
                                            ?>
                                        </td>
                                        <td class="center">
                                            <?php
                                            echo $html->link("Edit", array('action' => 'add_brand', "Brand",
                                                base64_encode($brand['Brand']['id'])), array('escape' => false));
                                            ?>
                                            <?php
                                            echo $html->link('Delete', array('controller' => 'Setups', 'action' => 'admin_delete_by_id',
                                                'Brand', $brand['Brand']['id'], 'admin_brands'), array('escape' => false, 'id' => 'alink'), 'Are you sure?');
                                            ?>
                                        </td>
                                    </tr>
                                    <?php $x++;
                                } ?>
                            </tbody>
                        <?php endif; ?>
                    </table>
                    <div class="dataTables_info"></div>
                    <div class="dataTables_paginate paging_full_numbers">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
